﻿using Microsoft.Extensions.DependencyInjection;
using StartsEAS_API.BLL.Interfaces.IAlterWorkerB;
using StartsEAS_API.DAL.AlterWorkerD;
using StartsEAS_API.Model;
using StartsEAS_API.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StartsEAS_API.BLL.AlterWorkerB
{
    public class AlterWorkerBLL: IAlterWorkerBLL
    {
        private readonly StarsEASContext _context;
        private readonly AlterWorkerDAL _alterWorkerDal;
        public AlterWorkerBLL(IServiceScopeFactory context)
        {
            _context = context.CreateScope().ServiceProvider.GetRequiredService<StarsEASContext>();
            _alterWorkerDal = new(_context);
        }
        public ResultUtils GetAllAlterWorkerByWorkerId(string token) { 
            return _alterWorkerDal.GetAllAlterWorkerByWorkerId(token);
        }
    }
}
